<script lang="ts" setup>

  import {storeToRefs} from "pinia";
  const visible = ref<boolean>(false);
  const content = ref<string>("");

  async function opens(){
    console.log("open")
    const res: any = await yujiRequest('/index/getContent', {
      method: 'POST',data:{}
    })
    if(res.code == 1){
      visible.value = !visible.value
      content.value = res.data.content
      console.log(res.data)
    }
  }



</script>
<template>
  <a-link type="text" @click="opens">
    <slot></slot>
  </a-link>
  <a-modal v-model:visible="visible" :footer="false">
    <template #title>
      试用协议
    </template>
    <div v-html="content"></div>
  </a-modal>
</template>
<style scoped lang="scss">

</style>
